%
% `SGTimeStamp.tex' -- describes the SGTimeStamp class
%
%  Written by Curtis Olson.  Started November, 2000.
%
% $Id: SGTimeStamp.tex,v 1.1.1.1 2002/09/07 02:58:20 curt Exp $
%------------------------------------------------------------------------


\documentclass[12pt]{article}

\usepackage{anysize}
\papersize{11in}{8.5in}
\marginsize{1in}{1in}{1in}{1in}

\usepackage{amsmath}

\usepackage{epsfig}

\usepackage{setspace}
\onehalfspacing

\usepackage{url}


\begin{document}


\title{
    SimGear \texttt{SGTimeStamp} class.
}


\author{
    Curtis L. Olson (\texttt{curt@flightgear.org})
}


\maketitle


\section{Introduction}

The \texttt{SGTimeStamp} class allows you to mark and compare time
stamps with microsecond accuracy\footnote{Dependant on supported system
  calls.}


\section{Synopsis}

\begin{verbatim}
#include <simgear/timing/timestamp.hxx>

SGTimeStamp();
SGTimeStamp( const long sec, const long micro_sec );
\end{verbatim}


\section{\texttt{SGTimeStamp}}

The \texttt{SGTimeStamp} is useful for tracking the elapsed time of
various events in your program.  You can also use it to keep
constistant motion across varying frame rates.

\subsection{Constructor}

\begin{verbatim}
SGTimeStamp();
SGTimeStamp( const long sec, const long micro_sec );
\end{verbatim}

This creates an instance of the \texttt{SGTimeStamp} object.  When
calling the constructor you may provide initial seconds an
microseconds values.

\section{Methods}

The \\texttt{stamp()} method updates an \texttt{SGTimeStamp} object
with the current system time values.


\section{Operators}

\begin{verbatim}
    SGTimeStamp& operator = ( const SGTimeStamp& t );
\end{verbatim}

The \texttt{=} operator compares two time stamps for equality and
returns true or false.

\begin{verbatim}
    SGTimeStamp operator + (const SGTimeStamp& t, const long& m);
\end{verbatim}

The \texttt{+} operator adds the specified number of microseconds to
the time stamp.

\begin{verbatim}
    friend long operator - (const SGTimeStamp& a, const SGTimeStamp& b);
\end{verbatim}

The \texttt{-} operator subtracts one \texttt{SGTimeStamp} from
another and returns the difference in microseconds.


\end{document}
